package com.yinhe.music.yhmusic.model;

import com.yinhe.music.yhmusic.singer.parse.Singer;

/**
 * Created by Johnson on 2018/3/11.
 */

public class DataItem {
    public static final int TYPE_CHARACTER = 0;
    public static final int TYPE_SINGER = 1;
    public static final int TYPE_HOT = 2;
    public static final int TYPE_RECENTLY = 3;

    private int type;
    private String character;

    private Singer singer;

    private boolean isBottom = false;

    public DataItem(String character) {
        this.character = character;
        type = TYPE_CHARACTER;
    }

    public DataItem(int type) {
        this.type = type;

        if (type == TYPE_HOT) {
            character = "热";
        } else if (type == TYPE_RECENTLY) {
            character = "$";
        }
    }
    public DataItem(Singer singer) {
        this.singer = singer;
        type = TYPE_SINGER;
    }

    public int getType() {
        return type;
    }

    public Singer getSinger() {
        return singer;
    }

    public String getCharacter() {
        return character;
    }

    public boolean isBottom() {
        return isBottom;
    }

    public void setBottom(boolean bottom) {
        isBottom = bottom;
    }
}
